/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import org.jsoup.Jsoup;

/**
 * <p>Project: javase - Exception2
 * <p>Powered by webrx On 2021-12-08 14:24:14
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Exception2 {
    public static void main(String[] args) {
        //try{}catch(Exception e){}

        try {
            Jsoup.connect("abc.cn").get();
            Object o = null;
            System.out.println(o.toString());
            int c = 6 / 0;
            int[] n = {};
            System.out.println(n[3]);
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("数组下标越界异常");
        } catch (NullPointerException e) {
            System.out.println("空指针异常");
        } catch (ArithmeticException e) {
            System.out.println("分母为0");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("未知异常" + e.getMessage());
        }
    }
}
